package com.cpi.cornpp.user.form;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionMapping;
import org.apache.struts.validator.ValidatorForm;

import com.cpi.cornpp.user.view.UserView;

/**
 * UserForm
 * 
 * @author Edgar Joao
 *
 */
public class UserForm extends ValidatorForm{

	/** Serialization UID */
	private static final long serialVersionUID = -843039475443044293L;
	/** Empty string */
	private static final String EMPTY = "";//$NON-NLS-1$
	
	/** UserView */
	private UserView userView;
	
	/** UserForm Constructor */
	public UserForm(){
		super();
		userView = new UserView(); 
	}

	public UserView getUserView() {
		return userView;
	}

	public void setUserView(UserView userView) {
		this.userView = userView;
	}
	
	public void reset(ActionMapping mapping, HttpServletRequest request) {
		userView.setUsrId(EMPTY);
		userView.setPassword(EMPTY);
	}
}
